<template>
	<div style="width: 70%; margin-left: 15%; ">
		<el-form :model="form" style="align-content: center; text-align: center" >
			<div>
				<el-card header="填写表单或上传文件">
					<el-form-item label="setup">
						<el-radio-group v-model="form.setup">
							<el-radio label="1" border>custom</el-radio>
							<el-radio label="2" border>config file</el-radio>
						</el-radio-group>
					</el-form-item>
				</el-card>
			</div>
			<el-card style="margin-top: 30px" v-show="setup2">
				<el-upload
						class="upload-demo"
						:action=setUpurl
						:on-preview="handlePreview"
						:on-remove="handleRemove"
						:before-remove="beforeRemove"
						multiple
						:limit="3"
						:on-exceed="handleExceed"
						:file-list="form.fileList">
					<el-button size="big" type="primary">点击上传</el-button>
					<!--				<div slot="tip" class="el-upload__tip">只能上传jpg/png文件，且不超过500kb</div>-->
				</el-upload>
			</el-card>
			<div style="margin-top:60px">
				<el-card  v-show="setup1">
					<el-form-item label="dataset">
						<!--<el-checkbox-group v-model="form.dataset" size="medium">
                            <el-checkbox-button label="1" name="type" style="margin-left: 10%">METR_LA</el-checkbox-button>
                            <el-checkbox-button label="2" name="type" style="margin-left: 10%">PEMSP4</el-checkbox-button>
                            <el-checkbox-button label="3" name="type" style="margin-left: 10%">PEMSD8</el-checkbox-button>
                            <el-checkbox-button label="3" name="type" style="margin-left: 10%">自定义</el-checkbox-button>
                        </el-checkbox-group>-->
						<el-select v-model="form.dataset" style="float:left; margin-left: 20%; width: 20%">
							<el-option
									v-for="item in staticForm.datasetType"
									:key="item"
									:label="item"
									:value="item">
							</el-option>
						</el-select>
						<el-upload
								class="upload-demo"
								:action=datasetUrl
								:on-preview="handlePreview"
								:on-remove="handleRemove"
								:before-remove="beforeRemove"
								multiple
								:limit="4"
								:on-exceed="handleExceed"
								:file-list="form.dataSetFileList"
								style="float: left; margin-left: 10%; width: 20%"
								v-show="dataset1">
							<el-button size="medium" type="primary">点击上传</el-button>
							<!--				<div slot="tip" class="el-upload__tip">只能上传jpg/png文件，且不超过500kb</div>-->
						</el-upload>
            <el-switch v-show="dataset1" active-text="是否公开"
                v-model="form.datasetIfPublic"
                active-color="#13ce66"
                inactive-color="#ff4949">
            </el-switch>
					</el-form-item>
					<el-divider></el-divider>
					<el-form-item label="loading">
						<el-select v-model="form.loading" multiple placeholder="please choose">
							<el-option
									v-for="item in staticForm.loadingType"
									:key="item"
									:label="item"
									:value="item">
							</el-option>
						</el-select>
					</el-form-item>
					<el-divider></el-divider>
					<el-form-item label="preprocessing">
						<el-checkbox-group v-model="form.preprocessing" style="height: 10px">
							<div style="float: right; width: 480px; height: 10px" >
								<el-checkbox-button label="1" style="float: left" border size="medium" >Traffic State Normalization</el-checkbox-button>
								<el-form-item  style="height: 10px; float: left; margin-left: 30px">
									<el-select v-model="form.prep1Avg" :disabled="noPreprocessing1" style="width: 100px" placeholder="average">
										<el-option label="true" value="true"></el-option>
										<el-option label="false" value="false"></el-option>
									</el-select>
								</el-form-item>
								<el-form-item  style="height: 10px; float: left; margin-left: 30px">
									<el-select v-model="form.prep1Var" :disabled="noPreprocessing1" style="width: 100px"placeholder="variance">
										<el-option label="true" value="true"></el-option>
										<el-option label="false" value="false"></el-option>
									</el-select>
								</el-form-item>
							</div>
							<br/>
							<div style="float:right; width: 480px ; margin-top: 30px">
								<el-checkbox-button label="2" style="float: left" border size="medium">Trajectories Filtering</el-checkbox-button>
								<el-form-item  style="float:left;height: 10px; margin-left: 30px">
									<el-input v-model="form.prep2Condition" :disabled="noPreprocessing2" style="width: 80px" placeholder="list"></el-input>
								</el-form-item>
								<el-form-item  style="float:left;height: 10px; margin-left: 30px">
									<el-input v-model="form.prep2Column" :disabled="noPreprocessing2" style="width: 100px" placeholder="condition"></el-input>
								</el-form-item>
							</div>
						</el-checkbox-group>
					</el-form-item>
				</el-card>
			</div>
			<div style="margin-top:60px">
				<el-card  v-show="setup1">
					<el-form-item label="model">
						<el-radio-group v-model="form.model">
							<el-radio label="1">Reproduced Models</el-radio>
							<el-radio label="2">Custom Models</el-radio>
						</el-radio-group>
					</el-form-item>
					<el-form-item label="task type" v-show="model1">
						<el-radio-group v-model="form.model1Form">
							<el-radio label="Traffic flow"></el-radio>
							<el-radio label="Traffic speed"></el-radio>
						</el-radio-group>
					</el-form-item>
					<el-form-item label="model type" v-show="model1Formflow & model1">
						<el-select v-model="form.model1List" placeholder="choose model type" >
							<el-option label="ACFM" value="ACFM"></el-option>
							<el-option label="AGCRN" value="AGCRN"></el-option>
							<el-option label="ASTGCN" value="ASTGCN"></el-option>
							<el-option label="CONVCN" value="CONVCN"></el-option>
							<el-option label="CRANN" value="CRANN"></el-option>
							<el-option label="MSTGCN" value="MSTGCN"></el-option>
							<el-option label="MultiSTGCnet" value="MultiSTGCnet"></el-option>
							<el-option label="ResLSTM" value="ResLSTM"></el-option>
							<el-option label="STResNet" value="STResNet"></el-option>
							<el-option label="STSGCN" value="STSGCN"></el-option>
							<el-option label="ToGCN" value="ToGCN"></el-option>
						</el-select>
					</el-form-item>
					<el-form-item label="model type" v-show="model1Formspeed & model1">
						<el-select v-model="form.model1List" placeholder="choose model type" >
							<el-option label="ATDM" value="ATDM"></el-option>
							<el-option label="AutoEncoder" value="AutoEncoder"></el-option>
							<el-option label="DCRNN " value="DCRNN "></el-option>
							<el-option label="DKFN " value="DKFN "></el-option>
							<el-option label="FNN" value="FNN"></el-option>
							<el-option label="GMAN " value="GMAN "></el-option>
							<el-option label="GTS " value="GTS "></el-option>
							<el-option label="GWNET" value="GWNET"></el-option>
							<el-option label="HGCN" value="HGCN"></el-option>
							<el-option label="MTGNN " value="MTGNN "></el-option>
							<el-option label="RNN " value="RNN "></el-option>
							<el-option label="STAGGCN " value="STAGGCN "></el-option>
							<el-option label="STGCN " value="STGCN "></el-option>
							<el-option label="STMGAT " value="STMGAT "></el-option>
							<el-option label="STTN " value="STTN "></el-option>
							<el-option label="Seq2Seq " value="Seq2Seq "></el-option>
							<el-option label="TGCLSTM " value="TGCLSTM "></el-option>
							<el-option label="TGCN" value="TGCN"></el-option>
							<el-option label="TemplateTSP" value="TemplateTSP"></el-option>

						</el-select>

					</el-form-item>

					<el-form-item v-show="model1">
						<el-input v-model="form.batchSize" style="width: 20%" placeholder="batchSize"></el-input>
						<el-input v-model="form.maxEpoch" style="width: 20%; margin-left: 6%" placeholder="maxEpoch"></el-input>
						<el-select v-model="form.gpu"  style="width: 20%; margin-left: 6%" placeholder="gpu">
							<el-option label="true" value="true"></el-option>
							<el-option label="false" value="false"></el-option>
						</el-select>
						<el-input v-model="form.rate" style="width: 20%; margin-left: 6%" placeholder="rate"></el-input>
					</el-form-item>
					<div>
						<el-form-item label="architecture" v-show="model2">
							<el-radio-group v-model="form.model2Arch">
								<el-radio label="1">ST-Sequential</el-radio>
								<el-radio label="2">GWaveNet</el-radio>
							</el-radio-group>
						</el-form-item>
						<el-form-item label="spatial" v-show="model2">
              <el-select v-model="form.model2SpatialForm" style="float:left; margin-left: 120px; width: 20%">
                <el-option
                    v-for="item in staticForm.spatialType"
                    :key="item"
                    :label="item"
                    :value="item">
                </el-option>
              </el-select>
              <el-upload
                  class="upload-demo"
                  :action="spatialUrl"
                  :on-preview="handlePreview"
                  :on-remove="handleRemove"
                  :before-remove="beforeRemove"
                  multiple
                  :limit="4"
                  :on-exceed="handleExceed"
                  :file-list="form.SpatialFileList"
                  style="float: left; margin-left: 10%; width: 20%"
                  v-show="spatialzi">
                <el-button size="medium" type="primary">点击上传</el-button>
                <!--				<div slot="tip" class="el-upload__tip">只能上传jpg/png文件，且不超过500kb</div>-->
              </el-upload>
              <el-switch active-text="是否公开" v-show="spatialzi"
                  v-model="form.model2SpatialFormIfPublic"
                  active-color="#13ce66"
                  inactive-color="#ff4949">
              </el-switch>
						</el-form-item>
						<el-form-item label="GNN" v-show="model2SpatialFormGNN & model2">
							<el-select v-model="form.model2SpatialList"  >
								<el-option label="GAT" value="GAT"></el-option>
								<el-option label="AVWGCN" value="AVWGCN"></el-option>
								<el-option label="Spectral GCN" value="Spectral GCN"></el-option>
								<el-option label="DCNN" value="DCNN"></el-option>
								<el-option label="K_hop GCN" value="K_hop GCN"></el-option>
								<el-option label="Mixhop GCN" value="Mixhop GCN"></el-option>
								<el-option label="ChebConvWithSAt" value="ChebConvWithSAt"></el-option>
							</el-select>
							<el-input v-model="form.model2SpatialInputSize" style="width: 100px; margin-left: 40px" placeholder="inputsize"></el-input>
							<el-input v-model="form.model2SpatialOutputSize" style="width: 100px; margin-left: 40px" placeholder="outputsize"></el-input>
						</el-form-item>
						<el-form-item label="CNN" v-show="model2SpatialFormCNN & model2">
							<el-select v-model="form.model2SpatialList"  >
								<el-option label="SpatialViewConv" value="SpatialViewConv"></el-option>
								<el-option label="SpatialGatedCNN" value="SpatialGatedCNN"></el-option>
							</el-select>
							<el-input v-model="form.model2SpatialInputSize" style="width: 100px; margin-left: 40px" placeholder="inputsize"></el-input>
							<el-input v-model="form.model2SpatialOutputSize" style="width: 100px; margin-left: 40px" placeholder="outputsize"></el-input>
						</el-form-item>
						<el-form-item label="Embedding" v-show="model2SpatialFormEmbedding & model2">
							<el-select v-model="form.model2SpatialList"  >
								<el-option label="Normal Embedding" value="Normal Embedding"></el-option>
								<el-option label="Linear Interpolation Embedding" value="Linear Interpolation Embedding"></el-option>
								<el-option label="Positional Embedding" value="Positional Embedding"></el-option>
							</el-select>
							<el-input v-model="form.model2SpatialInputSize" style="width: 100px; margin-left: 40px" placeholder="inputsize"></el-input>
							<el-input v-model="form.model2SpatialOutputSize" style="width: 100px; margin-left: 40px" placeholder="outputsize"></el-input>
						</el-form-item>
						<el-form-item label="Attention" v-show="model2SpatialFormAttention & model2">
							<el-select v-model="form.model2SpatialList"  >
								<el-option label="Spatial Attention" value="Spatial Attention"></el-option>
							</el-select>
							<el-input v-model="form.model2SpatialInputSize" style="width: 100px; margin-left: 40px" placeholder="inputsize"></el-input>
							<el-input v-model="form.model2SpatialOutputSize" style="width: 100px; margin-left: 40px" placeholder="outputsize"></el-input>
						</el-form-item>
					</div>
					<div>
						<el-form-item label="temporal" v-show="model2">
							<el-select v-model="form.model2TemporalForm" style="float:left; margin-left: 100px; width: 20%">
								<el-option
										v-for="item in staticForm.temporalType"
										:key="item"
										:label="item"
										:value="item">
								</el-option>
							</el-select>
							<el-upload
									class="upload-demo"
									:action="temporalUrl"
									:on-preview="handlePreview"
									:on-remove="handleRemove"
									:before-remove="beforeRemove"
									multiple
									:limit="4"
									:on-exceed="handleExceed"
									:file-list="form.TemporalFileList"
									style="float: left; margin-left: 10%; width: 20%"
									v-show="temporalzi">
								<el-button size="medium" type="primary">点击上传</el-button>
								<!--				<div slot="tip" class="el-upload__tip">只能上传jpg/png文件，且不超过500kb</div>-->
							</el-upload>
							<el-switch active-text="是否公开" v-show="temporalzi"
									   v-model="form.model2TemporalFormIfPublic"
									   active-color="#13ce66"
									   inactive-color="#ff4949">
							</el-switch>
						</el-form-item>
						<el-form-item label="RNN" v-show="model2TemporalFormRNN & model2">
							<el-select v-model="form.model2TemporalList"  placeholder="please choose">
								<el-option label="GCGRU" value="GCGRU"></el-option>
								<el-option label="GCLSTM" value="GCLSTM"></el-option>
								<el-option label="STLSTM" value="STLSTM"></el-option>
							</el-select>
							<el-input v-model="form.model2TemporalInputSize" style="width: 100px; margin-left: 40px" placeholder="inputsize"></el-input>
							<el-input v-model="form.model2TemporalOutputSize" style="width: 100px; margin-left: 40px" placeholder="outputsize"></el-input>
						</el-form-item>
						<el-form-item label="TCN" v-show="model2TemporalFormTCN & model2">
							<el-select v-model="form.model2TemporalList"  >
								<el-option label="Normal TCN" value="Normal TCN"></el-option>
								<el-option label="Inception TCN" value="Inception TCN"></el-option>
							</el-select>
							<el-input v-model="form.model2TemporalInputSize" style="width: 100px; margin-left: 40px" placeholder="inputsize"></el-input>
							<el-input v-model="form.model2TemporalOutputSize" style="width: 100px; margin-left: 40px" placeholder="outputsize"></el-input>
						</el-form-item>
						<el-form-item label="CNN" v-show="model2TemporalFormCNN & model2">
							<el-select v-model="form.model2TemporalList"  >
								<el-option label="Temporal CNN" value="Temporal CNN"></el-option>
								<el-option label="Temporal Gated CNN" value="Temporal Gated CNN"></el-option>
							</el-select>
							<el-input v-model="form.model2TemporalInputSize" style="width: 100px; margin-left: 40px" placeholder="inputsize"></el-input>
							<el-input v-model="form.model2TemporalOutputSize" style="width: 100px; margin-left: 40px" placeholder="outputsize"></el-input>
						</el-form-item>
						<el-form-item label="Attention" v-show="model2TemporalFormAttention & model2">
							<el-select v-model="form.model2TemporalList"  >
								<el-option label="Temporal Attention" value="Temporal Attention"></el-option>
							</el-select>
							<el-input v-model="form.model2TemporalInputSize" style="width: 100px; margin-left: 40px" placeholder="inputsize"></el-input>
							<el-input v-model="form.model2TemporalOutputSize" style="width: 100px; margin-left: 40px" placeholder="outputsize"></el-input>
						</el-form-item>
					</div>
					<div>
						<el-form-item label="prediction" v-show="model2">
							<el-select v-model="form.model2PredictionForm" style="float:left; margin-left: 90px; width: 20%">
								<el-option
										v-for="item in staticForm.predictionType"
										:key="item"
										:label="item"
										:value="item">
								</el-option>
							</el-select>
							<el-upload
									class="upload-demo"
									:action=predictionUrl
									:on-preview="handlePreview"
									:on-remove="handleRemove"
									:before-remove="beforeRemove"
									multiple
									:limit="4"
									:on-exceed="handleExceed"
									:file-list="form.PredictionFileList"
									style="float: left; margin-left: 10%; width: 20%"
									v-show="predictionzi">
								<el-button size="medium" type="primary">点击上传</el-button>
								<!--				<div slot="tip" class="el-upload__tip">只能上传jpg/png文件，且不超过500kb</div>-->
							</el-upload>
							<el-switch active-text="是否公开" v-show="predictionzi"
									   v-model="form.model2PredictionFormIfPublic"
									   active-color="#13ce66"
									   inactive-color="#ff4949">
							</el-switch>
						</el-form-item>
						<el-form-item label="RNN" v-show="model2PredictionFormMLP & model2">
							<el-select v-model="form.model2PredictionList"  >
								<el-option label="PositionwiseFeedForward" value="PositionwiseFeedForward"></el-option>
								<el-option label="FusionLayer" value="FusionLayer"></el-option>
								<el-option label="FullConnectLayer" value="FullConnectLayer"></el-option>
							</el-select>
							<el-input v-model="form.model2PredictionInputSize" style="width: 100px; margin-left: 40px" placeholder="inputsize"></el-input>
							<el-input v-model="form.model2PredictionOutputSize" style="width: 100px; margin-left: 40px" placeholder="outputsize"></el-input>
						</el-form-item>
						<el-form-item label="Attention" v-show="model2PredictionFormAttention & model2">
							<el-select v-model="form.model2PredictionList"  >
								<el-option label="AttentionLayer for RNN" value="AttentionLayer for RNN"></el-option>
								<el-option label="TransformAttention" value="TransformAttention"></el-option>
							</el-select>
							<el-input v-model="form.model2PredictionInputSize" style="width: 100px; margin-left: 40px" placeholder="inputsize"></el-input>
							<el-input v-model="form.model2PredictionOutputSize" style="width: 100px; margin-left: 40px" placeholder="outputsize"></el-input>
						</el-form-item>
					</div>
				</el-card>
				<el-card v-show="setup1" style="margin-top: 80px">
					<el-form-item label="EvaluationType">
						<el-select v-model="form.evaluationTypeChoose" multiple placeholder="please choose">
							<el-option
									v-for="item in staticForm.evaluationType"
									:key="item"
									:label="item"
									:value="item">
							</el-option>
						</el-select>
					</el-form-item>
					<el-form-item label="Window Settings">
						<el-input style="width: 200px" v-model="form.winSetting" ></el-input>
					</el-form-item>
					<el-form-item label="Negative Sample">
						<el-input style="width: 200px" v-model="form.negative"></el-input>
					</el-form-item>
				</el-card>
			</div>
		</el-form>
		<el-form :inline="true" style="text-align: center ; margin-top: 20px">
			<el-form-item>
				<el-button type="primary" @click="submitForm('form')">提交信息</el-button>
				<el-button type="primary" @click="getForm">返回</el-button>
			</el-form-item>
		</el-form>
	</div>

</template>

<script>
	export default {
		name: "Menu",
		data() {
			return {
				userId:'',
				modelId:'',
				staticForm:{
					evaluationType:[ 'MAE',
						'MAPE',
						'MSE',
						'RMSE',
						'masked_MAE',
						'masked_MSE',
						'masked_RMSE',
						'masked_MAPE ',
						'R2',
						'EVAR',],
					loadingType:[
						'Basic',
						'External Information'
					],
					datasetType:[
						'METR_LA',
						'PEMSP4',
						'PEMSD8',
						'自定义',
					],
					temporalType:[
						'RNN',
						'TCN',
						'CNN',
						'Attention',
						'自定义',
					],
          spatialType:[
            'GNN',
            'CNN',
            'Embedding',
            'Attention',
              '自定义'
          ],
		  predictionType:[
		  		'MLP',
				  'Attention',
				  '自定义'
		  ]
				},
				form: {
					dataSetFileList: [],
          datasetIfPublic: true,
					fileList: [],
					setup: "",
					loading: [],
					preprocessing: [],
					prep1Avg:"",
					prep1Var:"",
					prep1Column:"",
					prep2Condition:"",
					prep2Column:"",
					model:"",
					model1Form:"",
					model1List:"",
					model2Arch:"",
					model2SpatialForm:"",
          model2SpatialFormIfPublic: true,
					model2TemporalFormIfPublic: true,
					model2PredictionFormIfPublic: true,
					model2SpatialList:"",
					model2SpatialInputSize:"",
					model2SpatialOutputSize:"",
					model2TemporalForm:"",
					model2TemporalList:"",
					model2TemporalInputSize:"",
					model2TemporalOutputSize:"",
					model2PredictionForm:"",
					model2PredictionList:"",
					model2PredictionInputSize:"",
					model2PredictionOutputSize:"",
					dataset:"",
					batchSize:"",
					maxEpoch:"",
					rate:"",
					gpu:"",
					prediction:"",
					evaluationTypeChoose:[],
					winSetting:"",
					negative:""
				},
				tableData: []
			}
		},
		computed: {
      'setUpurl': function () {
        return "http://localhost:8088/user/"+this.userId+"/"+this.modelId+"/edit1/setupFile";
      },
      'datasetUrl': function (){
        return "http://localhost:8088/user/"+this.userId+"/"+this.modelId+"/edit1/datasetFile";
      },
      'spatialUrl': function (){
        return "http://localhost:8088/user/"+this.userId+"/"+this.modelId+"/edit1/spatialFile";
      },
      'temporalUrl': function (){
        return "http://localhost:8088/user/"+this.userId+"/"+this.modelId+"/edit1/temporalFile";
      },
      'predictionUrl': function (){
        return "http://localhost:8088/user/"+this.userId+"/"+this.modelId+"/edit1/predictionFile";
      },
			'dataset1': function () {
				return this.form.dataset === "自定义"	;
			},
			'setup1': function () {
				return this.form.setup === "1"
			},
			'setup2': function () {
				return this.form.setup === "2"
			},
			'noPreprocessing1': function () {
				return this.form.preprocessing.includes("1") === false
			},
			'noPreprocessing2': function () {
				return this.form.preprocessing.includes("2") === false
			},
			'model1Formflow': function () {
				return this.form.model1Form === "Traffic flow"
			},
			'model1Formspeed': function () {
				return this.form.model1Form === "Traffic speed"
			},
			'model1': function () {
				return this.form.model === "1"
			},
			'model2': function () {
				return this.form.model === "2"
			},
      'spatialzi': function (){
			  return this.form.model2SpatialForm === "自定义"
      },
			'temporalzi': function (){
				return this.form.model2TemporalForm === "自定义"
			},
			'predictionzi': function (){
				return this.form.model2PredictionForm === "自定义"
			},
			'model2SpatialFormGNN': function () {
				return this.form.model2SpatialForm === "GNN"
			},
			'model2SpatialFormCNN': function () {
				return this.form.model2SpatialForm === "CNN"
			},
			'model2SpatialFormEmbedding': function () {
				return this.form.model2SpatialForm === "Embedding"
			},
			'model2SpatialFormAttention': function () {
				return this.form.model2SpatialForm === "Attention"
			},
			'model2TemporalFormRNN': function () {
				return this.form.model2TemporalForm === "RNN"
			},
			'model2TemporalFormTCN': function () {
				return this.form.model2TemporalForm === "TCN"
			},
			'model2TemporalFormCNN': function () {
				return this.form.model2TemporalForm === "CNN"
			},
			'model2TemporalFormAttention': function () {
				return this.form.model2TemporalForm === "Attention"
			},
			'model2PredictionFormMLP': function () {
				return this.form.model2PredictionForm === "MLP"
			},
			'model2PredictionFormAttention': function () {
				return this.form.model2PredictionForm === "Attention"
			},
		},
		created() {
			this.userId = this.$route.query.userId
			this.modelId = this.$route.query.modelId
			this.$axios.get(`/user/${this.userId}/${this.modelId}/edit1/get`).then(res => {
				console.log(res.data)
				this.form = res.data.data
			})
		},
		methods: {

			handleRemove(file, fileList) {
				console.log(file, fileList);
			},
			handlePreview(file) {
				console.log(file);
			},
			handleExceed(files, fileList) {
				this.$message.warning(`当前限制选择 3 个文件，本次选择了 ${files.length} 个文件，共选择了 ${files.length + fileList.length} 个文件`);
			},
			beforeRemove(file, fileList) {
				return this.$confirm(`确定移除 ${ file.name }？`);
			},
			submitForm(formName) {
				this.$axios.put(`/user/${this.userId}/${this.modelId}/edit1/put`, this.form)
						.then(res => {
							this.$message({
								showClose: true,
								message: '恭喜你，操作成功',
								type: 'success',
								onClose:() => {
									this.getMenuTree()
								},
							});
							this.dialogVisible = false
						})
				this.$router.push({
					path: "/sys/users",
					query: {userId:this.userId}
				})
			},
			getForm() {
				// console.log(123)
				// this.$axios.get('/user/1/1/edit1').then(res => {
				//
				//   this.form = res.data
				// })
				this.$axios.get(`/user/${this.userId}/${this.modelId}/edit1/get`)
						.then(function (response) {
							// 处理成功情况
							this.form = response.data
							console.log("ok");
						})
						.catch(function (error) {
							// 处理错误情况
							console.log(error);
						})
						.then(function () {
							// 总是会执行
							console.log("sendok")
						});
			}
		}
	}
</script>

<style scoped lang="css">
	.el-form-item{
		font-family: "微软雅黑",serif;
	}

	.el-card ::v-deep .el-form-item ::v-deep .el-checkbox-group ::v-deep .el-checkbox-button{
		border-radius: initial;
		border: 2px;
	}

	.el-card ::v-deep .el-card__body {
	}
	.el-form-item ::v-deep .el-form-item__label{
		font-size: initial;
	}
	.el-card ::v-deep {
		background-color: rgba(188,206,218,0.2);
	}
</style>


<!--<el-card-->
<!--class="main">-->
<!--	-->
<!--</el-card>-->